#ifndef __XCRYPT_TASK_H__
#define __XCRYPT_TASK_H__

#include "xiostream.h"
#include <string>
#include <memory>

class XCrypt;
class XCryptTask:public XIOStream
{
public:
    void init(const std::string &password);
    void setState(bool isEncrypt);
private:
    virtual void handle() override;
private:
    std::shared_ptr<XCrypt> enc_;
    bool isEncrypt_ = true;
};

#endif
